From b448122853c49c2e2f7c67edcb118ea9be17ac39 Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 16 Aug 2008 01:55:34 +0000 Subject: [PATCH] Add 'created_by' option to OSM writer. --- osm.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/osm.c b/osm.c index 283d321ee..0835d3bd4 100644 --- a/osm.c +++ b/osm.c @@ -24,12 +24,13 @@ #include "avltree.h" #include "xmlgeneric.h" -static char *opt_tag, *opt_tagnd; +static char *opt_tag, *opt_tagnd, *created_by; static arglist_t osm_args[] = { { "tag", &opt_tag, "Write additional way tag key/value pairs", NULL, ARGTYPE_STRING, ARG_NOMINMAX }, { "tagnd", &opt_tagnd, "Write additional node tag key/value pairs", NULL, ARGTYPE_STRING, ARG_NOMINMAX }, + { "created_by", &created_by, "Use this value as custom created_by value","GPSBabel", ARGTYPE_STRING, ARG_NOMINMAX }, ARG_TERMINATOR }; @@ -849,11 +850,14 @@ osm_waypt_disp(const waypoint *wpt) break; } - gbfprintf(fout, " \n"); - + if (strlen(created_by) !=0) { + gbfprintf(fout, " \n"); + } + osm_write_tag("name", wpt->shortname); osm_write_tag("note", (wpt->notes) ? wpt->notes : wpt->description); if (wpt->icon_descr) @@ -901,10 +905,13 @@ osm_rte_disp_trail(const route_head *rte) { if (skip_rte) return; - gbfprintf(fout, " \n"); + if (strlen(created_by) !=0) { + gbfprintf(fout, " \n"); + } osm_write_tag("name", rte->rte_name); osm_write_tag("note", rte->rte_desc); -- 2.30.2